// 下载引入mock
import axios from "axios"
import Mock from "mockjs"
import banner from "./banner.json"
import floors from "./floors.json"

// 配置mock服务器
// 例: Mock.mock("/mock/banner", "get", { code: 200, data: banner })

// 注意!!!!!开启服务器需要在主入口文件中引入,引入文件后,里面代码都会执行,这时就开启了服务器

Mock.mock("/mock/banner", "get", { code: 200, message: "ok", data: banner })
Mock.mock("/mock/floors", "get", { code: 200, message: "ok", data: floors })

// 测试是否成功配置请求,返回数据内容等
// axios.get("/mock/banner").then(
//   response => console.log(response.data),
//   error => console.log(error.message)
// )
